package main

import (
	"atomgit.com/openlinksaas-org/tencloud/commands/cam_cmd"
	"atomgit.com/openlinksaas-org/tencloud/commands/cdn_cmd"
	"atomgit.com/openlinksaas-org/tencloud/commands/dnspod_cmd"
	"atomgit.com/openlinksaas-org/tencloud/commands/lighthouse_cmd"
	"atomgit.com/openlinksaas-org/tencloud/common"
	"github.com/spf13/cobra"
)

func main() {
	var rootCmd = &cobra.Command{}
	rootCmd.PersistentFlags().StringVar(&common.CmdSecretId, "secretId", "", "tencloud secretId")
	rootCmd.PersistentFlags().StringVar(&common.CmdSecretKey, "secretKey", "", "tencloud secretkey")
	rootCmd.PersistentFlags().StringVar(&common.CmdRegion, "region", "", "tencloud region(optional)")
	rootCmd.MarkPersistentFlagRequired("secretId")
	rootCmd.MarkPersistentFlagRequired("secretKey")

	rootCmd.AddCommand(cam_cmd.CamCmd, lighthouse_cmd.LighthouseCmd, dnspod_cmd.DnspodCmd, cdn_cmd.CdnCmd)

	rootCmd.Execute()
}
